package com.tiktok.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tiktok.entity.SystemLog;
import com.tiktok.mapper.SystemLogMapper;
import com.tiktok.service.SystemLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * 系统日志服务实现类
 */
@Service
@Slf4j
public class SystemLogServiceImpl extends ServiceImpl<SystemLogMapper, SystemLog> implements SystemLogService {

    @Override
    @Async
    public void saveLogAsync(SystemLog systemLog) {
        try {
            save(systemLog);
        } catch (Exception e) {
            log.error("保存系统日志失败", e);
        }
    }
} 